x =eval(input("请输入本月工资:"))
y=x-5000
if y <=1500:
    grade=y*0.03
elif 1500< y <=4500:
    grade=(y-1500)*0.1+1500*0.03
elif 4500< y <=9000:
    grade=(y-4500)*0.2+3000*0.1+1500*0.03
elif 9000< y <=35000:
    grade=(y-9000)*0.25+4500*0.2+3000*0.1+1500*0.03
elif 35000< y <=55000:
    grade=(y-35000)*0.3+26000*0.25+4500*0.2+3000*0.1+1500*0.03
elif 55000< y <80000:
    grade=(y-55000)*0.35+20000*0.3+26000*0.25+4500*0.2+3000*0.1+1500*0.03
elif y >80000:
    grade=(y-80000)*0.45+25000*0.35+20000*0.3+26000*0.25+4500*0.2+3000*0.1+1500*0.03
print("个人所得税为{}".format(grade))